<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
  <!-- Copyright 2011 Google Inc. All Rights Reserved. -->

  <!-- Licensed under the Apache License, Version 2.0 (the "License"); -->
  <!-- you may not use this file except in compliance with the License. -->
  <!-- You may obtain a copy of the License at -->

  <!--     http://www.apache.org/licenses/LICENSE-2.0 -->

  <!-- Unless required by applicable law or agreed to in writing, software -->
  <!-- distributed under the License is distributed on an "AS IS" BASIS, -->
  <!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -->
  <!-- See the License for the specific language governing permissions and -->
  <!-- limitations under the License. -->
  <head>
    <title>OAuth 2 postMessage flow example</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <link rel="StyleSheet" type="text/css" href="app.css" />
  </head>
  <body>

    <div id="auth-widget">

      <div id="checking-auth" style="display: none;">
        <button class="auth-button" id="restart-auth-button"
                title="Check authorization&#8230;">Authorizing&#8230; &#8635;</button>
        <button class="auth-button" id="cancel-auth-button"
                title="Cancel">&#215;</button>
      </div>

      <div id="auth-required" style="display: none;">
        <button class="auth-button" id="auth-button">Authorize&#8230;</button>
        <button class="auth-button" id="auth-retry-button"
                title="Retry">&#8635;</button>
      </div>

      <div id="authorized" style="display: none;">
        <div id="not-checking-auth">
          <button class="auth-button" id="auth-refresh-button">Authorized &#8635;</button>
          <button class="auth-button" id="auth-discard-button"
                  title="Discard">&#215;</button>
        </div>
        <div>
          <button id="user-info" style="display: none;"></button>
        </div>
      </div>

    </div>

    <script
       type="text/javascript"
       src="https://oauth.googleusercontent.com/gadgets/js/rpc:shindig.random:shindig.uri.js?c=2"></script>

    <script type="text/javascript" src="../../src/client/dom_util.js"></script>
    <script type="text/javascript" src="../cfg/dom_channels_config.js"></script>
    <script type="text/javascript" src="../../src/client/dom_channels.js"></script>

    <script type="text/javascript" src="../../src/client/ui_lightbox.js"></script>
    <script type="text/javascript" src="../cfg/ui_userinfo_config.js"></script>
    <script type="text/javascript" src="../../src/client/ui_userinfo.js"></script>

    <script type="text/javascript" src="../cfg/oauth2_core_config.js"></script>
    <script type="text/javascript" src="../../src/client/oauth2_core.js"></script>
    <script type="text/javascript" src="../cfg/oauth2_relay_config.js"></script>
    <script type="text/javascript" src="../../src/client/oauth2_relay.js"></script>
    <script type="text/javascript" src="../cfg/oauth2_authWindow_config.js"></script>
    <script type="text/javascript" src="../../src/client/oauth2_authWindow.js"></script>
    <script type="text/javascript" src="../cfg/oauth2_userinfo_config.js"></script>
    <script type="text/javascript" src="../../src/client/oauth2_userinfo.js"></script>

    <script type="text/javascript" src="app_config.js"></script>
    <script type="text/javascript" src="app.js"></script>
  </body>
</html>
